/***************************************************************************
 *   This is a part of the NextCAD Web APP.                                *
 *   Copyright (C) AMCAX, All rights reserved.                             *
 ***************************************************************************/

// import { observer } from 'mobx-react-lite'
// import React from 'react';
// import {
//   MacCommandOutlined,
//   BorderOutlined,
//   LineOutlined,
//   CaretUpOutlined,
//   CodeSandboxOutlined,
//   GatewayOutlined,
//   CodepenOutlined,
//   // CopyOutlined,
//   // PauseOutlined,
//   PlusCircleOutlined,
//   PlusSquareOutlined,
//   PlusOutlined,
// } from '@ant-design/icons';
import { Icon } from '@amcax/base';

const icons = {
  // 通用icon
  //Selection: <Icon name='icon-selection' />,
  //Degree: <Icon name='icon-jiaodufanxiang' />,
  //Distance: <Icon name='icon-julifanxiang' />,
  // ReverseDeg: (
  //   <Icon name='icon-jiaodufanxiang' style={{ transform: 'rotate(180deg)' }} />
  // ),
  // ReverseDistance: (
  //   <Icon name='icon-julifanxiang' style={{ transform: 'rotate(180deg)' }} />
  // ),
  // cad/基本命令图标
  //Scenario: <Icon name='scenario' />,
  //CmdEnvironment: <img className='cmd-icon' math={iconEnvironment} />,
  //CmdCAD: <img className='cmd-icon' math={iconCAD} />,
  //CmdHeating: <img className='cmd-icon' math={iconHeating} />,
  //CmdCAE: <img className='cmd-icon' math={iconCAE} />,
  //CmdTSpline: <img className='cmd-icon' math={iconTSpline} />,
  //CmdQtDemo: <img className='cmd-icon' math={iconQt} />,
  //CAD: <Icon name='cad' />,
  //CmdBIM: <img className='cmd-icon' math={iconBIM} />,
  //CmdPickShellMode: <MacCommandOutlined />,
  //CmdPickFaceMode: <BorderOutlined />,
  //CmdPickEdgeMode: <LineOutlined />,
  //CmdPickVertexMode: <CaretUpOutlined />,
  //CmdCreate: <Icon name='create-model' />,
  //CmdLinearArray: <Icon name='icon-cmd-linear-array' />,
  //CmdCircularArray: <Icon name='icon-cmd-ring-array' />,
  //CmdMakeBox: <CodeSandboxOutlined />,
  //CmdMakeTorus: <Icon name='torus' />,
  //CmdMakeCone: <Icon name='cone' />,
  // CmdMakeSphere: <Icon type='sphere' />,
  CmdMakeSphere: <Icon name='toolbar/sphere' />,
  //CmdMakeCylinder: <Icon name='cylinder' />,
  //CmdMakeQuadball: <Icon name='quadball' />,
  //CmdMakePlane: <Icon name='plane' />,
  //CmdCreateZone: <Icon name='plane' />,
  //CmdTobeReplacedIcon: <Icon name='plane' />,
  //CmdMakeCircular: <Icon name='circle' />,
  //CmdMakeCircularRing: <Icon name='plane-torus' />,
  //CmdMakeArcRing: <Icon name='icon-cmd-sketch-arc' />,
  //CmdMakeArcPointRing: <Icon name='icon-cmd-sketch-point-arc' />,
  //CmdMakeCurveRing: <Icon name='curve' />,
  //CmdMakeByControlPoint: <Icon name='icon-cmd-sketch-bspline' />,
  //CmdMakeBySample: <Icon name='icon-cmd-sketch-bspline-by-sample' />,
  //CmdEllipseCurve: <Icon name='ellipse-curve' />,
  //CmdMakeFill: <Icon name='period' />,
  //CmdViewMode: <Icon name='view-mode' />,
  //WireFrameView: <GatewayOutlined />,
  //RenderView: <CodepenOutlined />,
  //SmoothView: <Icon name='smooth-view' />,
  //CmdExtrude: <img className='cmd-icon' math={iconExtrude} />,
  CmdExtrude: <Icon name='toolbar/stretch' />,
  CmdLoft: <Icon name='toolbar/loft' />,
  CmdSweep: <Icon name='toolbar/sweep' />,
  CmdRevolve: <Icon name='toolbar/revolve' />,

  CmdLine: <Icon name='toolbar/line' />,
  CmdPolyline: <Icon name='toolbar/polyline' />,
  CmdSpline: <Icon name='toolbar/spline' />,
  CmdCircle: <Icon name='toolbar/circle' />,
  CmdEllipse: <Icon name='toolbar/ellipse' />,
  CmdArc: <Icon name='toolbar/arc' />,
  CmdPolygon: <Icon name='toolbar/polygon' />,
  CmdRectangle: <Icon name='toolbar/rectangle' />,

  CmdBlock: <Icon name='toolbar/block' />,
  CmdCylinder: <Icon name='toolbar/cylinder' />,
  CmdCone: <Icon name='toolbar/cone' />,
  CmdTorus: <Icon name='toolbar/torus' />,
  CmdTube: <Icon name='toolbar/tube' />,
  CmdPrism: <Icon name='toolbar/prism' />,
  CmdSphere: <Icon name='toolbar/sphere' />,
  CmdWedge: <Icon name='toolbar/wedge' />,

  CmdArray: <Icon name='toolbar/rectangular-pattern' />,
  //CmdLoft: <img className='cmd-icon' math={iconLoft} />,
  CmdBoolean: <Icon name='toolbar/boolean' />,
  // CmdBoolean: <img className='cmd-icon' math={iconBoolean} />,
  //CmdSubtract: <img className='cmd-icon' math={iconSubtract} />,
  CmdSubtract: <Icon name='toolbar/hole' />,
  //CmdRotate: <img className='cmd-icon' math={iconRotate} />,
  CmdRotate: <Icon name='toolbar/rotate' />,
  //CmdSweep: <img className='cmd-icon' math={iconSweep} />,
  //CmdWaterPipe: <img className='cmd-icon' math={iconWaterPipe} />,
  //CmdFillet: <img className='cmd-icon' math={iconFillet} />,
  CmdFillet: <Icon name='toolbar/fillet' />,
  //CmdChamfer: <img className='cmd-icon' math={iconChamfer} />,
  CmdChamfer: <Icon name='toolbar/chamfer' />,
  //CmdDelete: <Icon type='delete' />,
  //CmdExportPickedModels: <Icon name='toolbar/export' />,
  CmdDelete: <Icon name='toolbar/delete' />,
  // CmdConstraint: <Icon name='toolbar/constraint' />,
  // CmdFixed: <Icon name='toolbar/fixed' />,
  // CmdDistance: <Icon name='toolbar/distance' />,
  // CmdAngle: <Icon name='toolbar/angle' />,
  // CmdFace: <Icon name='toolbar/face' />,
  // CmdLine: <Icon name='toolbar/line' />,
  // CmdSlot: <Icon name='toolbar/slot' />,
  // CmdFreeMoveDragLeft: <Icon name='toolbar/freemove-dragleft' />,
  // CmdFreeMoveDragRight: <Icon name='toolbar/freemove-dragright' />,
  // CmdDeleteConsLast: <Icon name='toolbar/deletecons-last' />,
  // CmdDeleteConsAll: <Icon name='toolbar/deletecons-all' />,
  // -----------------------------------------------------
  //AutoDelete: <Icon name='auto' />,
  //SelectDelete: <Icon name='selection' />,
  //CmdCopy: <CopyOutlined />,
  CmdCopy: <Icon name='toolbar/copy' />,
  //CmdMirror: <PauseOutlined />,
  CmdMirror: <Icon name='toolbar/mirror' />,
  // CopyFace: <Icon name='copy-face' />,
  // CopyShape: <Icon name='copy-shell' />,
  // CmdAdd: <PlusOutlined />,
  //AddByPoints: <PlusCircleOutlined />,
  //CmdPoints: <Icon name='icon-cmd-point' />,
  //AddByEdges: <PlusSquareOutlined />,
  // CmdStitch: <Icon name='seam' />,
  // StitchByVertex: <Icon name='seam' />,
  // StitchByEdge: <Icon name='seam' />,
  //CmdWeld: <Icon name='weld' />,
  //CmdTransform: <Icon name='transform' />,
  //Move: <Icon type='move' />,
  CmdMove: <Icon name='toolbar/move' />,
  //Scale: <Icon name='scale' />,
  // Rotate: <Icon type='rotate' />,
  //Rotate: <Icon name='toolbar/rotate' />,
  // MirrorByPoint: <Icon name='icon-cmd-mirror' />,
  // MirrorByPlane: <Icon name='mirror-plane' />,
  // CmdBevel: <Icon name='bevel' />,
  // CmdBridge: <Icon name='bridge' />,
  // CmdFill: <Icon name='hole-fill' />,
  // FillHole: <Icon name='hole-fill' />,
  // FillAuto: <Icon name='auto' />,
  // CmdThicken: <Icon name='thicken' />,
  // CmdSeparate: <Icon name='icon-cmd-construct' />,
  // CmdCombine: <Icon name='combine' />,
  // CmdSplit: <Icon name='split' />,
  // CrossSplit: <Icon name='cross' />,
  // LoopSplit: <Icon name='loop' />,
  // SplitWithEdges: <Icon name='line' />,
  // SplitWithPoints: <Icon name='vertex' />,
  //CmdCrease: <Icon name='crease' />,
  //CmdUndo: <Icon type='undo' />,
  CmdUndo: <Icon name='toolbar/undo' />,
  //CmdRedo: <Icon type='redo' />,
  CmdRedo: <Icon name='toolbar/redo' />,
  //CmdDebug: <Icon name='debug' />,
  // ImportTSpline: <Icon name='import' />,
  // ExportTSpline: <Icon name='export' />,
  //ExportSTL: <Icon name='export' />,
  //Record: <Icon name='record' />,
  //Diagnostics: <img className='cmd-icon' math={iconDiagnostics} />,
  //StopCore: <Icon name='stop' />,
  //CmdConfig: <Icon name='config' />,
  //CmdImage: <Icon name='period' />,
  //CmdCurvature: <Icon name='curvature' />,
  //CmdMeasure: <img className='cmd-measure' math={measure} />,
  CmdMeasure: <Icon name='toolbar/measure' />,
  CmdCompound: <Icon name='toolbar/compound' />,
  CmdSplit: <Icon name='toolbar/split' />,
  CmdShell: <Icon name='toolbar/shell' />,
  // sketch草图
  //CmdSketch: <img className='cmd-icon' math={iconSketch} />,
  // CmdSaveSketch: <Icon name='save' />,
  // CmdExitSketch: <Icon name='done' />,
  // CmdSketchSegment: <Icon name='icon-cmd-sketch-segment' />,
  // CmdSketchMultiSegment: <Icon name='icon-cmd-sketch-multi-segment' />,
  // CmdSketchCircle: <Icon name='icon-cmd-sketch-circle' />,
  // CmdSketchEllipse: <Icon name='icon-cmd-ellipse' />,
  // CmdSketchRectangle: <Icon name='icon-cmd-sketch-rectangle' />,
  //CmdPan: <Icon name='pan' />,
  // CmdMeasureDistance: <Icon name='icon-cmd-measure-distance' />,
  // cmdMeasureHorizontal: <Icon name='icon-cmd-measure-distance' />,
  // cmdMeasureVertical: <Icon name='icon-cmd-measure-distance' />,
  // CmdMeasureCircle: <Icon name='icon-cmd-measure-distance' />,
  // CmdMeasureAngle: <Icon name='icon-cmd-measure-distance' />,

  CmdImport: <Icon name='toolbar/import' />,
  CmdExport: <Icon name='toolbar/export' />,
  // 草图约束
  //Parallel: <Icon name='icon-cmd-parallel' />,
  //Angle: <Icon name='angle' />,
  //AngleBetween: <Icon name='angle_between' />,
  //Coincident: <Icon name='icon-cmd-coincident' />,
  //DistancePL: <Icon name='distance_pl' />,
  //DistancePP: <Icon name='distance_pp' />,
  //EqualLength: <Icon name='icon-cmd-equal-length' />,
  //EqualRadius: <Icon name='icon-cmd-equal-radius' />,
  //Fillet: <Icon name='icon-cmd-fillet' />,
  //Horizontal: <Icon name='icon-cmd-horizontal' />,
  //Length: <Icon name='length' />,
  //Lock: <Icon name='icon-cmd-lock' />,
  //Perpendicular: <Icon name='icon-cmd-derpendicular' />,
  //PointInMiddle: <Icon name='icon-cmd-point-in-middle' />,
  //PointOnCircle: <Icon name='point_on_circle' />,
  //PointOnCurve: <Icon name='point_on_curve' />,
  //PointOnLine: <Icon name='icon-cmd-point-on-line' />,
  //RadiusLength: <Icon name='radius' />,
  //Symmetry: <Icon name='icon-cmd-symmetry' />,
  //Tangent: <Icon name='icon-cmd-tang ent' />,
  //Vertical: <Icon name='vertical' />,
  // simulation仿真
  //CmdSimulation: <Icon name='simulation' />,
  //StartSimulation: <Icon name='simulation_start' />,
  //StopSimulation: <Icon name='stop' />,
  //JobList: <Icon name='job_list' />,
  // Import: <Icon type='load' />,
  //Import: <Icon name='toolbar/import' />,
  //Export: <Icon name='export' />,
  //Export: <Icon type='toolbar/export' />,
  //Materials: <Icon name='materials' />,
  //Add: <Icon name='add' />,
  //MatrialManager: <Icon name='material_list' />,
  //Rigidbody: <Icon name='rigidbody' />,
  //FluidRegion: <Icon name='body' />,
  //Emitter: <Icon name='surface' />,
  //CmdAtom: <img className='cmd-icon' math={iconAtom} />
  CmdFitView: <Icon name='toolbar/fit-screen' />,
  CmdHelix: <Icon name='toolbar/helix' />,
  CmdPyramid: <Icon name='toolbar/pyramid' />,

  // ===== 电力行业 =====、
  CmdAngleBoard: <Icon name='toolbar/electric/angle-board' />,
  CmdEleShelf: <Icon name='toolbar/electric/ele-shelf' />,
  CmdFixedHoop: <Icon name='toolbar/electric/fixed-hoop' />,
  CmdInsulator: <Icon name='toolbar/electric/insulator' />,
  CmdFence: <Icon name='toolbar/electric/fence' />,
  CmdRingCabinet: <Icon name='toolbar/electric/ringCabinet' />,
  CmdEleCable: <Icon name='toolbar/electric/cable' />,
  // ===== 电力行业 =====

  // ===== BIM =====
  CmdBimBlock: <Icon name='toolbar/bim/block' />,
  CmdBimLinearBlock: <Icon name='toolbar/bim/linear-block' />,
  CmdBimDoor: <Icon name='toolbar/bim/door' />,
  CmdBimWindow: <Icon name='toolbar/bim/window' />,
  CmdBimSubtract: <Icon name='toolbar/bim/subtract' />,
  CmdBimStair: <Icon name='toolbar/bim/stair' />,
  CmdColorBrush: <Icon name='toolbar/bim/material-brush' />,
  CmdMaterialBrush: <Icon name='toolbar/bim/material-brush' />,
  CmdMaterialPick: <Icon name='toolbar/bim/pick-brush' />,
  // ===== BIM =====

  // 门窗编辑器
  CmdFeneMuntin: <Icon name='toolbar/fenestrabtion/muntin' />,
  CmdFeneMullion: <Icon name='toolbar/fenestrabtion/mullion' />,
  CmdSwingSash: <Icon name='toolbar/fenestrabtion/swingsash' />, // 平开扇
  CmdHangingSash: <Icon name='toolbar/fenestrabtion/hangingsash' />, // 悬窗扇
  CmdSlidingSash: <Icon name='toolbar/fenestrabtion/slidingsash' />, // 平推扇
  CmdDoubleSwingSash: <Icon name='toolbar/fenestrabtion/doubleswingsash' />, // 双平开扇
};

interface Props {
  id: string;
}

export const CmdIcon = ({ id }: Props) => {
  return icons[id] || null;
};
